<?php
require_once 'BaseController.php';

/**
 * マイページ新規登完了画面コントローラクラス<br />
 *
 * @package apamanshop
 * @author
 * @copyright　
 */
class Mypage_MypagefinController extends Mypage_BaseController
{
	/**
	 * インデックスアクション
	 *
     * @access public
     * @return void
	 */
	public function indexAction()
	{

		//表示テンプレートパス設定
        $this->_display_path = APPLICATION_PATH . '/modules/mypage/views/scripts/common2.tpl';
		$this->_data['loginurl'] = $this->_loginurl;

        //=====表示用共通パラメータ設定=====
		$this->setCommonParams();

		//=====ブロック設定=====
		$this->setBlock($this->_mypagefin_helper,$this->_js_mypagefin_helper);

		//=====表示=====
        $this->display($this->_display_path);
	}


	/**
	 * 変更登録アクションへ遷移する
	 *
     * @access public
     * @return void
	 */
	public function regreAction()
	{
		$this->_forward( 'index' , 'mypageregre');
	}

	/**
	 * マイページ新規登録完了画面の共通パラメータ設定
	 *
	 */
	private function setCommonParams()
	{
        //ID(e-mail)
        $id = (array_key_exists('eID', $this->_params)) ? $this->_params['eID'] : null;
        $Pass = (array_key_exists('ePass', $this->_params)) ? $this->_params['ePass'] : null;
        $Pass2 = (array_key_exists('ePass2', $this->_params)) ? $this->_params['ePass2'] : null;
        $NickName = (array_key_exists('eNickName', $this->_params)) ? $this->_params['eNickName'] : null;
        $Sex = (array_key_exists('eSex', $this->_params)) ? $this->_params['eSex'] : null;
        $Age = (array_key_exists('eAge', $this->_params)) ? $this->_params['eAge'] : null;
        $Info = (array_key_exists('eInfo', $this->_params)) ? $this->_params['eInfo'] : null;
        $HTMLMail = (array_key_exists('eHTMLMail', $this->_params)) ? $this->_params['eHTMLMail'] : null;
        $MyUcd = (array_key_exists('MyUcd', $this->_params)) ? $this->_params['MyUcd'] : null;

		//TODO:formParam、CHeyaCD、SrhKbnStockはいらないと思う。。。
        //検索条件からのパラメータ引きずり
		$formParam = (array_key_exists('formParam', $this->_params)) ? $this->_params['formParam'] : null;
        //Cookie登録上限部屋CD
		$heyaCd = (array_key_exists('CHeyaCD', $this->_params)) ? $this->_params['CHeyaCD'] : null;
		$searchKbnStock = (array_key_exists('SrhKbnStock', $this->_params)) ? $this->_params['SrhKbnStock'] : null;

		//=====タイトル=====
		$this->setTitle('賃貸情報アパマンショップ［マイページ｜新規登録完了］');

		//=====ヘッダタイトル=====
		$this->setHeaderTitle('賃貸住宅・賃貸マンション・賃貸アパートの検索ならアパマンショップ。全国の賃貸住宅、賃貸不動産情報が満載です。');

		//=====タイトルバー設定=====
		if (Apm_Otheritems::IsNullOrEmpty($formParam) == false)
		{
			$this->setContentsTitle('地域から探す　検索条件を登録', 'class=\'orange\'');
		}
		elseif (Apm_Otheritems::IsNullOrEmpty($heyaCd) == false)
		{
			$this->setContentsTitle('物件詳細　お気に入りに登録', 'class=\'orange\'');
		}
		else
		{
			$this->setContentsTitle('マイページ　新規登録完了', '');
		}

		//なんか色々
		$this->_data['strFormParam'] = $formParam;
		$this->_data['strCHeyaCD'] = $heyaCd;
		$this->_data['strSrhKbnStock'] = $searchKbnStock;
		$this->_data['eID'] = $id;
		$this->_data['ePass'] = $Pass;
		$this->_data['ePass2'] = $Pass2;
		$this->_data['eSex'] = $Sex;
		$this->_data['eAge'] = $Age;
		$this->_data['eInfo'] = $Info;
		$this->_data['eHTMLMail'] = $HTMLMail;
		$this->_data['MyUcd'] = $MyUcd;

		$this->_breadcrumb->reset();
        $this->_breadcrumb->add(Apm_Config_Search::BREADCRUMB_TOP, $this->_baseurl);
        $this->_breadcrumb->add('マイページ', $this->_baseurl . 'mypage/menu');
        $this->_breadcrumb->add('新規登録', $this->_sslurl . 'mypage/mypagereg');
        $this->setBreadCrumb($this->_breadcrumb->generateBreadcrumb());

        //
        $this->addMetaCss('/css/inquiry/hp/form.css');
	}
}
?>
